package com.test.demo.service.Imp;

import com.test.demo.dao.CompanyMapper;
import com.test.demo.model.Company;
import com.test.demo.service.CompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * 编写者：郝嘉
 * 编写时间：2019-05-27
 * 模块功能描述：公司表service接口的实现
 */
@Service
public class CompanyServiceImpl implements CompanyService {

   @Autowired
    private CompanyMapper companyMapper;


    @Override
    public List<Company> getCIsBegin() {
        System.out.println("执行SQL语句");
        return companyMapper.getCIsBegin();
    }

    @Override
    public List<Company> getAllh() {
        return companyMapper.getAllh();
    }

    @Override
    public int insertCompany(Company companymodel) {
        return companyMapper.insertCompany(companymodel);
    }

    @Override
    public int delCompany(Integer cid) {
        return companyMapper.delCompany(cid);
    }

    @Override
    public int updateCompany(Company companymodel){
        return companyMapper.updateCompany(companymodel);
    }

    //根据主键查找信息
    @Override
    public Company selectByPrimaryKey1(Integer cid) {
        return companyMapper.selectByPrimaryKey1(cid);
    }
}
